home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / usr / share / avahi / avahi_status next >
Encoding:
Text File  |  2007-03-27  |  568 b   |  24 lines

  1. #!/bin/sh -e
  2.  
  3. # Author: Jonathan Riddell <jriddell@ubuntu.com>
  4. # (C) 2006  Canonical Ltd.
  5. #
  6. # Get the status of Avahi daemon through exit code:
  7. #
  8. # 0: daemon is disabled (default configuration)
  9. # 1: daemon is enabled for LAN
  10. # 2: the configuration was adapted manually; in this case enable_avahi cannot
  11. #    be used
  12.  
  13. CONF=/etc/default/avahi-daemon
  14.  
  15. [ -f $CONF ] || exit 2
  16.  
  17. if egrep -qi '^[[:space:]]*AVAHI_DAEMON_START=1[[:space:]]*(#.*)?$' $CONF; then
  18.     exit 1
  19. fi
  20. if egrep -qi '^[[:space:]]*AVAHI_DAEMON_START=0[[:space:]]*(#.*)?$' $CONF; then
  21.     exit 0
  22. fi
  23. exit 2
  24.